<template>
  <div class="department-wrap">
    <div class="department-main-left">
      <!-- 系简介 -->
      <div class="dep-intro">
        <div class="detail-main-title padding-dis">{{departmentInfo.depName}}</div>
        <div class="intro-info">{{departmentInfo.depIntro}}</div>
      </div>
      <!-- 主干学科 -->
      <div class="main-subject">
        <div class="detail-main-title">主干学科</div>
        <div class="subject">
          <img :src="item" v-for="item in departmentInfo.subjectPic" :key="item">
        </div>
      </div>
      <!-- 核心知识领域 -->
      <div class="core-knowledge-area">
        <div class="detail-main-title">核心知识领域</div>
        <div class="area">
          <p v-for="item in departmentInfo.coreKnowledge" :key="item">{{item}}</p>
        </div>
      </div>
    </div>
    <!-- 学生情况 -->
    <div class="department-main-right">
      <div class="detail-main-title">学生情况</div>
      <div class="student-sistuation">
        <div class="sistuation-item" v-for="item in departmentInfo.studentSituation" :key="item.title">
          <div class="item-left">
            <p>{{item.title}}</p>
            <p>{{item.num}}</p>
          </div>
          <div class="item-right">
            <img :src="item.pic">
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import talents from '@/api/talents'
export default {
  props: {
    curDep: {
      type: Number,
      required: true
    }
  },
  data () {
    return {
      departmentInfo: talents.departmentInfo[this.curDep] // 各系信息
    }
  },
  mounted () {
  }
}
</script>
<style lang="stylus" scoped>
.department-wrap {
  display: inline-block;
  margin-top: 30px;
  .department-main-left {
    width: 830px;
    float: left;
    margin-right: 20px
    .dep-intro {
      background: #FFFFFF;
      border-radius: 16px;
      padding: 0 20px 20px;
      .intro-info {
        padding: 20px;
        background: #FAFAFA;
        border-radius: 8px;
        font-size: 16px;
        font-family: SourceHanSansCN-Regular, SourceHanSansCN;
        font-weight: 400;
        color: #404040;
        line-height: 36px;
      }
    }
    .main-subject {
      margin-top: 20px;
      display: inline-block;
      background: #FFFFFF;
      border-radius: 16px;
      .subject {
        padding: 0 20px 20px;
        font-size: 0;
        display: inline-block
        img {
          float: left
          width: 256px;
          height: 66px;
          margin-right: 11px
          &:last-child {
            margin-right: 0
          }
        }
      }
    }
    .core-knowledge-area {
      margin-top: 20px;
      background: #FFFFFF;
      border-radius: 16px;
      .area {
        display: inline-block;
        padding: 0 20px 6px;
        p {
          float: left;
          padding: 14px;
          background: #F6F6F6;
          border-radius: 8px;
          font-size: 14px;
          font-family: SourceHanSansCN-Regular, SourceHanSansCN;
          font-weight: 400;
          color: #181818;
          line-height: 14px;
          margin-right: 10px;
          margin-bottom: 10px
        }
      }
    }
  }
  .department-main-right {
    width: 350px;
    background: #FFFFFF;
    border-radius: 16px;
    float: left
    .student-sistuation {
      padding: 0 20px 20px;
      .sistuation-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 88px;
        background: #FFFFFF;
        border-radius: 8px;
        border: 1px solid #F1F1F1;
        padding: 0 16px 0 19px;
        margin-top: 10px
        &:first-child {
          margin-top: 0
        }
        .item-left {
          p {
            font-size: 16px;
            font-family: SourceHanSansCN-Regular, SourceHanSansCN;
            font-weight: 400;
            color: #A1A1A1;
            line-height: 16px
            &:last-child {
              font-size: 24px;
              font-weight: 500;
              color: #101010;
              line-height: 24px;
              margin-top: 9px
            }
          }
        }
        .item-right {
          width: 85px;
          height: 80px;
          font-size: 0
          img {
            width: 100%;
            height: 100%
          }
        }
      }
    }
  }
}
</style>